Package-level declarations
Types
Link copied to clipboard
data class BarChartData(val label: String, val value: Float, val segments: List<BarChartSegment> = emptyList())
Data for a single bar (category) in a SimpleBarChart.
Link copied to clipboard
A single segment within a stacked bar, representing one sub-category's contribution to the bar's total height.
Link copied to clipboard
A single data point in a SimpleLineChart, pairing an X-axis label with a numeric Y value.
Link copied to clipboard
A single slice of a pie or donut chart, pairing a categorical label with its numeric magnitude and display color.
Functions
Link copied to clipboard
Link copied to clipboard
fun SimpleBarChart(data: List<BarChartData>, contentDescriptionPrefix: String, emptyLabel: String, modifier: Modifier = Modifier, barColor: Color = MaterialTheme.colorScheme.primary, gridColor: Color = MaterialTheme.colorScheme.outlineVariant, chartHeight: Dp = DefaultStylishDimensions.barChartHeight, topRadius: Dp = 4.dp, labelTextSize: Dp = 10.dp, gridLineCount: Int = 4, animate: Boolean = true)
A vertical bar chart with optional stacked segments, rendered on a Compose Canvas for lightweight, dependency-free drawing.
Link copied to clipboard
fun SimpleLineChart(data: List<LineChartData>, contentDescriptionPrefix: String, emptyLabel: String, modifier: Modifier = Modifier, lineColor: Color = MaterialTheme.colorScheme.primary, fillColor: Color = MaterialTheme.colorScheme.primary.copy(alpha = 0.1f), pointColor: Color = MaterialTheme.colorScheme.primary, gridColor: Color = MaterialTheme.colorScheme.outlineVariant, chartHeight: Dp = DefaultStylishDimensions.lineChartHeight, strokeWidth: Dp = 2.5.dp, pointRadius: Dp = 4.dp, pointInnerRadius: Dp = 2.dp, labelTextSize: Dp = 10.dp, gridLineCount: Int = 5, maxLabelCount: Int = 6, animate: Boolean = true)
A line chart with area fill, grid lines, data-point markers, and categorical X-axis labels, rendered on a Compose Canvas.
Link copied to clipboard
fun SimplePieChart(data: List<PieChartData>, contentDescriptionPrefix: String, modifier: Modifier = Modifier, chartSize: Dp = DefaultStylishDimensions.pieChartSize, holeRatio: Float = 0.3f, skeletonRatio: Float = 0.4f, holeColor: Color = MaterialTheme.colorScheme.surface, skeletonColor: Color = MaterialTheme.colorScheme.outlineVariant, startAngle: Float = -90f, animate: Boolean = true)
A lightweight donut-style pie chart rendered entirely on a Canvas.
Link copied to clipboard
Returns a color from the theme's categorical chart palette by index.